package com.jadows.tdog.message.handler.pipline;

import com.jadows.tdog.domain.ChatMessage;
import io.netty.channel.Channel;

/**
 * 消息流水线
 *
 * @author taojiacheng
 */
public interface IMessagePipeline {

    /**
     * 添加消息处理工序
     *
     * @param process 消息处理工序
     * @return 消息流水线
     */
    IMessagePipeline addLast(IMessageProcess process);

    /**
     * 处理消息
     */
    void process(ChatMessage message, Channel channel);

}
